import req1 from '@/lib/req1'
// 员工档案 查看接口
export function staffAPI() {
  return req1.get('/archives/staffList')
}
//新增绩效考核
export function newaddedAPI({ name, phone, deptName, educational, birthday, date, type
}) {
  console.log(name, phone, deptName, educational, birthday, date, type);
  return req1.post('/archives/staffAdd', { name, phone, deptName,educational,birthday,date, type
  })
}
// 修改
export function xiuListAPI({
  id,
  name,
  phone,
  deptName,
  educational,
  birthday,
  date
}) {
  return req1.put('/archives/staffUpdate', {
    id,
    name,
    phone,
    deptName,
    educational,
    birthday,
    date
  })
}
// 查看公司所有部门接口
export function chabuList() {
  return req1.get('/archives/deptList')
}
// 查询所有员工姓名
export function chanameList() {
  return req1.get('/archives/getNameList')
}
// 查询员工姓名对应部门接口
export function chanameandbuList(name) {
  return req1.get('/archives/getDeptByName', {
    name
  })
}
//删除
export function DeleteAPI(id){
id = id.join()
  return req1.delete('/archives/staffDelete',{id})
}

// 页面搜索查询
export function userListApi(deptName) {
  return req1.get('/archives/staffLike', {
    deptName
  })
}
